package com.workmanager.service;

import com.workmanager.bean.TeacherBean;
import com.workmanager.mapper.TeacherInfoMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by YIJIE on 2016/8/31.
 */
@Service
public class TeacherService {
    @Resource(name="teacherInfoMapper")
    private TeacherInfoMapper teacherInfoMapper;
    public TeacherBean getTeacherById(int teacher_id){
        return  teacherInfoMapper.getTeacherById(teacher_id);
    }
    public boolean updateTeacher(TeacherBean teacherBean){
        int result=teacherInfoMapper.update(teacherBean);
        return result>=0;
    }

    public TeacherInfoMapper getTeacherInfoMapper() {
        return teacherInfoMapper;
    }

    public void setTeacherInfoMapper(TeacherInfoMapper teacherInfoMapper) {
        this.teacherInfoMapper = teacherInfoMapper;
    }
}
